package laboratorio8;
//Universidad del Valle de Guatemala
//Kevin Godinez, 12717
//Samantha Catun, 12382
//Roger Artemio Diaz Fuentes, 12176
//Algoritmos y Estructuras de Datos
//Hoja de trabajo No.8

import java.util.*;
        
public class TreeMapSet implements WordSet{
   
    private TreeMap base;
       
        //Constructor
        public TreeMapSet()
        {
                base = new TreeMap();
        }
       
        //GET
        public Word get(Word word)
        {
             return (Word)base.get(word.getWord());
        }
       
       //Agregar nodo
        public void add(Word wordObject)
        {
          if (!base.containsKey(wordObject.getWord()))
            base.put(wordObject.getWord(),wordObject);
        }
}
